package com.powernode.feign.sentinel;

import com.alibaba.fastjson.JSON;
import com.powernode.constant.BusinessEnum;
import com.powernode.domain.MemberAddr;
import com.powernode.feign.OrderMemberFeign;
import com.powernode.model.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 *
 */
@Component
@Slf4j
public class OrderMemberFeignSentinel implements OrderMemberFeign {
    @Override
    public Result<MemberAddr> getMemberAddrById(Long id) {
        log.error("远程调用会员模块：根据标识查询会员收货地址信息失败，参数:{}", JSON.toJSON(id));
        return Result.fail(BusinessEnum.OPERATION_FAIL);
    }

    @Override
    public Result<MemberAddr> getMemberDefaultAddrByOpenId(String openId, Long addrId) {
        log.error("远程调用会员模块：查询当前会员默认收货地址失败，参数:{}", JSON.toJSON(openId));
        return Result.fail(BusinessEnum.OPERATION_FAIL);
    }

    @Override
    public Result<String> getMemberNickNameByOpenId(String openId) {
        log.error("远程调用会员模块：根据会员openid查询会员昵称失败，参数:{}", JSON.toJSON(openId));
        return Result.fail(BusinessEnum.OPERATION_FAIL);
    }
}
